package pers.dawnyang.config.shiro;

import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
import com.jagregory.shiro.freemarker.ShiroTags;

/**
 * 
 * @author dawn yang
 * @date 2021/05/12
 */

// @Component
public class FreeMakerShiroConfig {

  @Autowired
  private FreeMarkerConfigurer config;

  @PostConstruct
  public void setShiroTags() {
    config.getConfiguration().setSharedVariable("shiro", new ShiroTags());
  }
}
